import request from '@/utils/request'

// 查询存储柜管理列表
export function listCabinet(query) {
  return request({
    url: '/archive/cabinet/list',
    method: 'get',
    params: query
  })
}

// 查询存储柜管理详细
export function getCabinet(id) {
  return request({
    url: '/archive/cabinet/' + id,
    method: 'get'
  })
}

// 新增存储柜管理
export function addCabinet(data) {
  return request({
    url: '/archive/cabinet',
    method: 'post',
    data: data
  })
}

// 修改存储柜管理
export function updateCabinet(data) {
  return request({
    url: '/archive/cabinet',
    method: 'put',
    data: data
  })
}

// 删除存储柜管理
export function delCabinet(id) {
  return request({
    url: '/archive/cabinet/' + id,
    method: 'delete'
  })
}
//获取存储柜
export function cabinetlist(query) {
  return request({
    url: '/archive/cabinet/getList',
    method: 'get',
    params: query
  })
}
//开柜
export function openLock(id) {
  return request({
    url: '/archive/cabinet/openLock/'+ id,
    method: 'get',
  })
}

// 盘点
export function rfid(query) {
  return request({
    url: '/archive/cabinet/rfid',
    method: 'get',
    params: query
  })
}
// 盘点
export function updateSingleHardVersion(data) {
  return request({
    url: '/archive/cabinet/updateSingleHardVersion',
      method: 'put',
    data: data
  })
}